/*
 * @Author: zhanghongqiao 
 * @Date: 2023-02-10 11:32:49 
 * @Email: 991034150@qq.com 
 * @Description: 项目配置文件
 * @Last Modified by: zhanghongqiao
 * @Last Modified time: 2023-02-15 10:50:44
 */
 

import globalConfig from './base.config'

let config:any = {}

export default {
  /**
   *  将源配置覆盖到全局配置
   *  @param    {Object}  srcConfig 源配置，将会覆盖到全局配置
   */
  merge(srcConfig: any) {
    config = {
      ...globalConfig,
      ...srcConfig
    }
  },
  /**
   *  获取某个配置项的值
   *  @param    {string}  key 配置项的key
   *  @return   {*}  配置项的值
   */
  get<T>(key: string):any {
    return config[key]
  }
}
